﻿@model Jb.Domain.PackageSubscription
@using Jb.Web.Utility;

@{
	String pageTitle = "Package Subscription Status";    
    ViewBag.Title = Html.GetPageTitle(pageTitle);
    ViewData[AppConstants.ViewDataKeys.SELECTED_MENU] = EmployerMenu.Subscriptions;
	bool _HasSaved = ViewData.HasSaved();
}

@functions {
    public String GetCountString(int count){
        if (count < 0)
            return "Unlimited";

        return count.ToString();
    }
}

<div class="jb-page-heading">
    <h1>@pageTitle</h1>
    <div>Your subscribed package information at @ConfigReader.SiteName</div>
</div>
<div class="jb-page-content">
    @if (Model == null)
    {
        @Html.WarningMessageBox(String.Format("You haven't subscribed to any package at {0}. Or your subscription has expired. Please <a href='/Package/List' class='btn btn-mini'>Subscribe Now</a>", ConfigReader.SiteName), "Warning!")
    }
    else { 
        <div class="para">
            <ul>
                <li>Package Name: @Model.Package.Name </li>
                <li>Job Post Limit: @GetCountString(Model.MaxJobPost)</li>
                <li>Resume Download Limit: @GetCountString(Model.MaxResumeDownload)</li>
                <li>Total Job Posted: @Model.JobPosted</li>
                <li>Total Resume Downloaded: @Model.ResumeDownloaded</li>
                <li>Expire Date: @Model.SubscribedOn.AddDays(Model.Duration).ToString(AppConstants.ValueOf.DATE_FROMAT_DISPLAY)</li>
            </ul>
        </div>
    }    
</div>
